Applications and other software generally send data to a display screen, such as a liquid crystal display (LCD) or cathode ray tube (CRT) display, to generate a display image in a default or normal orientation. The display image can for example be a document, digital image or object. In many cases, the default display orientation for the display image is set to a landscape mode, in which more screen pixels are displayed horizontally than vertically. This is because many display screens are manufactured to have a screen area that is physically wider than it is tall. The computer or other device connected to the display device generally drives the display device with a video subsystem or card including a video display memory or buffer. An application or other software can send display data to the buffer to be read out by display circuitry, to generate video signals to illuminate the pixels of the display device.
The display device is configured to receive and display the pixels in a predetermined scan order, which in the case of a computer monitor such as an LCD or CRT screen begins with the upper left corner. The display device proceeds in a predetermined scan order or direction across the screen from left to right, and then retraces to the first pixel of the next row down. When the last (bottom right) pixel of the display screen is reached, the display returns to the initial (upper left) pixel location and repeats the left-to-right and top-to-bottom scan. In general, the parameters of display height (in pixels), width (in pixels), and pixel-to-pixel dot pitch (or separation) of the physical display device characterize the display area of a typical display screen.
In terms of the interplay between the software driving the display image, the video buffer memory, and the display device, in general the application or other software sends the display data to the buffer in a configuration corresponding to the intended display mode. That is, the application or other software loads the display data to the buffer in an order corresponding to the orientation of the currently selected display mode. For example, a word processing program operating in landscape mode sends display data representing the text to be displayed in the same order that the textual characters will be encountered in the usual left-to-right, top-to-bottom order when scanned by the display device, to generate a display image of correct width, height, and orientation. If the user selects an option in the application to change the display orientation to a portrait mode, the application can update the height, width, and pitch parameters to cause the display screen to display the display image in the selected new orientation. Operating systems, applications, graphics subsystems, and computer monitors today are all capable of generating display images in a variety of formats, orientations, and resolutions.
Even with the availability of modern monitors and mature device drivers, however, difficulties in rendering display images can occur. Many display devices are equipped, for example, with a mechanical swivel or pivot that allows a user to physically rotate the display device. Modern operating systems can detect the physical rotation of a display device, for instance using an internal gyroscope, switch, or other detector. Applications and other software can be configured to receive a notification of a display device rotation, and can adjust the order of, or parameters for, the display data loaded into the video buffer memory to compensate for the changed orientation.
The display device itself, however, continues to physically scan the screen pixels in the same direction and order for which the device is hardwired. This causes the starting corner to be displayed in a different location (e.g., the top left corner becomes the top right corner when the display device is rotated 90 degrees clockwise). This results in the word processing document, digital photograph, or other display image being displayed sideways.
It is possible to use a 3D accelerator chip or other display hardware to perform a “blit” operation to read the display data out of video buffer memory, re-order the display data to correspond to the rotated orientation, and store a second copy of the display data to drive the display device in the rotated position. Performing this correction in hardware, however, involves disadvantages. Those drawbacks include a drain on video memory bandwidth, and a need to store twice as much display data per screen. It may be desirable to provide methods and systems that automatically sense and correct for physically rotated display screens, while maintaining proper orientation of the display image.